#ifndef STANDARTNEXTPLAYER
#define STANDARTNEXTPLAYER

#include "INextPlayer.h"

namespace dgame
{
	class StandartNextPlayer : public INextPlayer<StandartNextPlayer>
	{
	public:
		virtual Player *nextPlayer(Player **players, int size, Player *activePlayer, void *data)
		{
			int pos = 0;
			for(int i = 0; i < size; i++)
			{
				if(activePlayer->getName() == players[i]->getName())
					pos = i;
			}
			pos = (pos + 1) % size;
			return *(players + pos);
		}
	};
}

#endif